## Set global paths for data and working directories
## JHL 

## Alternative: Code directly into sbatch file to keep global options in different instances of R

# Packages 
list.of.packages <- c("folderfun")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages,repos = "http://cran.us.r-project.org")

require(folderfun)

options(PATH_HOME="/scratch/midway2/jleung/replication")
# setff("path_home")

# options(RMS_MOVE="/project2/databases/nielsen/nielsen_extracts/RMS/%d/Movement_Files")
# setff("rms_move")

# options(RMS_ANNUAL="/project2/databases/nielsen/nielsen_extracts/RMS/%d/Annual_Files")
# setff("rms_annual")

options(RMS_MOVE="/scratch/midway2/jleung/replication/raw/nielsen/nielsen_extracts/RMS/%d/Movement_Files")
# setff("rms_move")

options(RMS_ANNUAL="/scratch/midway2/jleung/replication/raw/nielsen/nielsen_extracts/RMS/%d/Annual_Files")
# setff("rms_annual")